
// model = pause({meta:{view:"/form.jsp"}, data:{name:"", age:0}});
// return pause({meta:{view:"/end.jsp"}, data:{name:model.data.name, age:model.data.age}});

function webFlow(model) {

	do {
		model = sendViewAndWait("/form.jsp", {name:"", age:0});
	} while(model.data.name.length < 3 || model.data.age < 0 || model.data.age > 120);
	
	model = sendViewAndWait("/end.jsp", {name:model.data.name, age:model.data.age});
	
	return flowEnd;
}


function webFlow2(model) {

	var sexCombo = sendQuery("SELECT * FROM SEX").data; 

	model = sendViewAndWait("/form.jsp", {name:"", age:0, sexCombo:sexCombo});
	
	return flowEnd;
}